]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
inhibitShortcutsDialog: Enable line wrapping for additional label
authorJonas Dreßler <verdre@v0yd.nl>
Sun, 28 Jun 2020 20:28:57 +0000 (22:28 +0200)
committerFlorian Müllner <florian.muellner@gmail.com>
Mon, 29 Jun 2020 10:17:07 +0000 (10:17 +0000)
The inhibitShortcutsDialog can show an additional label which explains
how to restore shortcuts. This label is not managed by the
MessageDialogContent, so we need to enable line wrapping and disable
ellipsization ourselves.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2616

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1336

js/ui/inhibitShortcutsDialog.js

index 14731daa5ac84a443a235a6f88697ae40f7e0eda..ac86eea49e47e49e00c10b86dbac5f188cb51dfe 100644 (file)
@@ -1,5 +1,5 @@
 /* exported InhibitShortcutsDialog */
-const { Clutter, Gio, GLib, GObject, Gtk, Meta, Shell, St } = imports.gi;
+const { Clutter, Gio, GLib, GObject, Gtk, Meta, Pango, Shell, St } = imports.gi;
 
 const Dialog = imports.ui.dialog;
 const ModalDialog = imports.ui.modalDialog;
@@ -90,6 +90,8 @@ var InhibitShortcutsDialog = GObject.registerClass({
                 text: _('You can restore shortcuts by pressing %s.').format(restoreAccel),
                 style_class: 'message-dialog-description',
             });
+            restoreLabel.clutter_text.ellipsize = Pango.EllipsizeMode.NONE;
+            restoreLabel.clutter_text.line_wrap = true;
             content.add_child(restoreLabel);
         }